package main

import (
	"fmt"
	"strings"
	"reflect"
)

type SillyHatString string

func (flag SillyHatString) toString() SillyHatString{
	return flag;
}

func (flag SillyHatString) toGolangString() string{
	fmt.Println("-----------",reflect.TypeOf(flag))
	fmt.Println("-----------",reflect.ValueOf(flag).Kind())
	return fmt.Sprintf("%s", flag);
}

func (flag SillyHatString) toUpperCase() SillyHatString{
	fmt.Println("-----------",reflect.TypeOf(flag))
	fmt.Println("-----------",reflect.ValueOf(flag).Kind())
	return SillyHatString(strings.ToUpper(fmt.Sprintf("%s", flag)));
}

func (flag SillyHatString) toLowerCase() SillyHatString{
	return SillyHatString(strings.ToLower(fmt.Sprintf("%s", flag)));
}

func (flag SillyHatString) equals(judge SillyHatString) bool{
	return strings.EqualFold(fmt.Sprintf("%s", flag), fmt.Sprintf("%s", judge));
}

func main()  {
	var myString SillyHatString = "SillyHat 哈哈";
	var testSuccess SillyHatString = "SillyHat 哈哈";
	var testError SillyHatString = "SillyHat 哦啦啦";
	fmt.Println(myString)
	fmt.Println(myString.toString())
	fmt.Println(myString.toUpperCase())
	fmt.Println(myString.toLowerCase())
	fmt.Println(myString.equals(testSuccess))
	fmt.Println(myString == testSuccess)
	fmt.Println(myString.equals(testError))
}